#44 new
Jeff Schwab

undefined method `fixtures'

Reported by Jeff Schwab | March 18th, 2009 @ 05:03 PM

The tests installed by restful_authentication encounter undefined-method errors, starting with "undefined method fixtures'" for the unit tests. The problem seems to be that the tests derive only from Test::Unit::TestCase, whereas the relevant methods are defined in ActiveRecord::TestCase and ActionController::TestCase for unit and functional tests, respectively.

My current work-around is to change the base class by hand, e.g. to replace

class UserTest < Test::Unit::TestCase


class UserTest < ActiveRecord::TestCase

This addresses the error, so that the tests at least can run.

Comments and changes to this ticket

  • Taryn East

    Taryn East March 30th, 2009 @ 09:40 AM

    • Title changed from “undefined method `fixtures'” to “2.0-non-compliant”

    You don't know me but... I'm working on some Rails 2.0-compliant stuff to get the code working with Rails 2.3.2 (which I'm using at work).

    I've made a fork of the repo for this. When I'm done I'll make a pull-request.

    My plan is to add another command-line option "--two-point-oh" that will switch on the 2.0-style things (eg rm fixtures and ids, and using "test do" instead of "def test_").

    Right now I'm not sure if this option should be "on" or "off" by default.

    whatcha think?


  • Taryn East

    Taryn East March 30th, 2009 @ 09:56 AM

    Hmmm - just thinking - if you were able to just remove 'fixtures', perhaps there should be no backwards-compatibility at all. Is there not some sort of "RA Classic" for that sort of thing?

    Just curious... it'd make my life much easier...

    Cheers, Taryn

  • Jeff Schwab

    Jeff Schwab March 31st, 2009 @ 06:05 PM

    I see the same problem with 2.3 and 2.0, so I'm not sure what the flag would do. It's not just 'fixtures'; if you remove that, other errors occur later in the file.

  • Jeff Schwab

    Jeff Schwab April 1st, 2009 @ 11:42 AM

    How and why did you change the name of the ticket? This is not a 2.0-specific issue; in fact, I don't see how it's version-specific at all. I think you'll have better luck if you change the name back, and open a new ticket.

  • Jeff Schwab

    Jeff Schwab April 1st, 2009 @ 11:43 AM

    • Title changed from “2.0-non-compliant” to “undefined method `fixtures'”

    Restoring a title that matches the error message, so other victims will be able to find this ticket more easily.

  • Jeff Schwab

    Jeff Schwab April 5th, 2009 @ 07:52 AM

    This problem appears to be fixed in http://github.com/technoweenie/r...

    The version with the problem is still online at: http://svn.techno-weenie.net/pro...

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Restful Authentication Generator

This widely-used plugin provides a foundation for securely managing user
* Login / logout
* Secure password handling
* Account activation by validating email
* Account approval / disabling by admin
* Rudimentary hooks for authorization and access control.


People watching this ticket